﻿// -----------------------------------------------------------------------
// <copyright file="Image.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems, 2012. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace MBOP.Core.Entities.Common
{
	#region Usings

	using System;

	#endregion

	/// <summary>
	/// Image's entity.
	/// </summary>
	public class Image
	{
		#region Private Fields

		/// <summary>
		/// Represents the image id.
		/// </summary>
		private string _id;

		#endregion

		#region Properties

		/// <summary>
		/// Gets the image id.
		/// </summary>
		public string ID
		{
			get
			{
				if (this._id == null)
				{
					this._id = Guid.NewGuid().ToString();
				}

				return this._id;
			}

			private set 
			{ 
				this._id = value; 
			}
		}

		/// <summary>
		/// Gets or sets the image name.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Gets or sets the image uri.
		/// </summary>
		public string Uri { get; set; }

		/// <summary>
		/// Gets or sets the data id.
		/// </summary>
		public int? DataID { get; set; }

		/// <summary>
		/// Gets or sets the data.
		/// </summary>
		public virtual Data Data { get; set; }

		#endregion
	}
}
